home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
batch
/
bat
/
edit.bat
< prev
next >
Wrap
DOS Batch File
|
1984-11-10
|
896b
|
32 lines
bat * General purpose edit caller *
bat * Enter here the name of editor to call:
bat %0 = EDLIN
bat * Make sure editor is somewhere
bat STATEOF %0.COM%c
bat IF %R <> 1 SKIP 4
bat STATEOF %0.EXE%b
bat IF %R <> 1 SKIP 2
bat TYPE The editor could not be found on any diskette!
bat EXIT
bat * Setup drive # where editor really is:
bat IF %R <> 0 %0 = %R:%0
bat * Serch for the file to be edited...
bat %c =
bat STATEOF %1%c
bat IF %R <> 9 SKIP 3
bat TYPE The filename to edit is invalid.
bat TYPE Reenter command . . .
bat EXIT
bat IF %R <> 1 %1 = %c
bat * Now enter the DOS command to do the edit
bat * and also pass any operands the user typed.
bat * By stacking the command, this batch file can be
bat * terminated so DOS won't need to re-access it
bat * just to find the end of file mark.
bat STACK %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
bat EXIT